class StoreImage < ApplicationRecord
	belongs_to :store
	belongs_to :imageable, polymorphic: true, touch: true

	scope :by_ids, ->(ids) { where(id: ids) if ids.present? }

	def url
          if image.present?
            "#{$qiniu_config[:host]}/#{image}"
          else
            ' '
          end
      end


end
